package com.example.sender.sender;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Random;

/**
 * @Description TODO
 * @Author 奶茶
 * Created by on 2018/9/4 16:12.
 */
@Component
public class MessageSender {

    @Autowired
    AmqpTemplate amqpTemplate;

    public void send(){
        //topic
        amqpTemplate.convertAndSend("exchange","topic.examPlan.url","C:\\lhj_work\\be-openexam-dataservice\\f9830886-945c-4348-a873-3bee19668bd0\\3e935a3de0aa4754b01fdd507846b61a\\examplan.json");
        //fanout exchange
        //amqpTemplate.convertAndSend("fanoutExchange","","Test FanoutExchange Message");
    }

}
